import {StudentDataParams} from "./requestTypes";

export interface ExclFileName{
    COUNT: {
        NUM: number
    },
    DAT: {
        FILENAME: string
    },
    ERROR: [
        {
            errcode: string,
            error: string
        }
    ],
    RET: [
        {
            RET: string
        }
    ]
}

export interface ResponseBase {
    errcode: string
    error: string
}

export interface ResponseHasToken extends ResponseBase{
    OPENID: string
    // SESSION_KEY: string
}

export interface ResponseRET<T = any> {
    "COUNT": {
        NUM: number
    }[]
    "DAT": T[],
    "ERROR": ResponseBase[],
    "RET": {
       RET: string
    }[]
}

export interface ResSyllabus<T = any> {
    "COUNT": {
        NUM: number,
		WX_PIC:string,
		PLACE:string
    }[]
    "DAT": T[],
    "ERROR": ResponseBase[],
    "RET": {
       RET: string
    }[]
}

export interface UploadRET {
    "DATA": {
        filename: string
    }
    "RET": {
        "RET": string
    }
}

export interface CSOptionsDAT {
    CSID: number
    CSVALUE: any
    CSNAME: string
}

export enum UserState {
    STOP = '0',
    START = '1'
}

export interface LoginRes extends ResponseHasToken {
    TOKEN: string
    CUSER_ID: string
    USERNO: number
    USERNAME: string
    ROLE_ID: string
    ROLENAME: string
    ZL_FLAG: '0' | '1'
    ENROLL_FLAG: '0' | '1'
    STATE: UserState
}

export interface PhoneNumRES {
    "phoneNumber": string,
    "purePhoneNumber": string,
    "countryCode": string,
    "watermark":
        {
            "appid": string,
            "timestamp": number
        }
}

export interface FetchKXClassListDAT {
    "rowid": number
    "MAJOR_ID": number
    "MAJOR_NAME": string
    "CLASS_ID": number
    "CLASSNAME": string
    "S_KK_DATE": string
    "SH_FLAG": string
    "SH_FLAGNR": string
    "SKSJS": string
    "SKSJSNR": string
    "DSZ_FLAG": string
    "DSZ_FLAGNR": string
    "SFJE1": string
    "SFJE2": string
    "ZZY_FLAG": string
    "QXXZ_FLAG": string
}

export interface FetchMembersDAT {
    "rowid": number,
    "CUSER_ID": number,
    "MAJOR_NAME": string,
    "USERNO": string,
    "USERNAME": string,
    "TEACHERNO": string,
    "TEACHERNAME": string,
    "SEXNR": null,
    "PHONENO": string,
    "STATE": string,
    "STATENR": string
}

export interface EnrollListDAT{
    "rowid": number
    "ENROLL_ID": number
    "STUDENTNO": string
    "STUDENTNAME": string
    "SFZNO": string
    "SEXNR": string
    "ADDR": string
    "PHONENO": string
    "LXR": string
    "LXR_PHONENO": string
    "ZZMMNR": string
    "WHCDNR": string
    "YDW": string
    "YZW": string
    "CLASS_IDS": string
    "CLASS_NAMES": string
    "STATE": string
    "STATENR": string
}

export interface MajorOptDAT {
    "MAJOR_ID": number,
    "MAJOR_NAME": string
}

export interface VerifyEnrollDAT {
    CBM_ID: number
    ENROLL_ID: number
    CLASSNAME: string
    STUDENTNO: string
    STUDENTNAME: string
    SH_FLAGNR: string
    STATENR: string
}

export interface DoVerifyEnrollDAT {
    CBM_ID: number
    ENROLL_ID: number
    CLASSNAME: string
    STUDENTNO: string
    STUDENTNAME: string
    SH_FLAG: string
    SH_FLAGNR: string
    STATE: string
    STATENR: string
}

export interface PayListDAT {
    "rowid": number,
    "JFD_ID": number,
    "JFDNO": string,
    "PJNO": string
    "STUDENTNO": string,
    "STUDENTNAME": string,
    "CLASS_ID": number,
    "CLASSNAME": string,
    "SFJE": number,
    "STATE": string,
    "STATENR": string
}

export interface VerifyEnrollDetailDAT extends Omit<EnrollListDAT, 'CLASS_NAMES' | 'CLASS_IDS'>{
    CBM_ID: number
    CLASSNAME: string
    CLASS_ID: number
    STUDENT_FLAGNR: string
    STUDENT_FLAG: number
}

export interface MemberDetailTeacherDAT {
    "CUSER_ID": number,
    "MAJOR_ID": number,
    "MAJOR_NAME": string,
    "USERNO": string,
    "USERNAME": string,
    "TEACHERNO": string,
    "TEACHERNAME": string,
    "SEX": "12",
    "SEXNR": "男",
    "PHONENO": "13502977682",
    "STATE": "1",
    "STATENR": "启用"
}

export interface MemberDetailStudentDAT extends Omit<EnrollListDAT, 'CLASS_IDS' | 'CLASS_NAMES'>{
    CUSER_ID: string | number
    USERNO: string
    USERNAME: string
}

export interface PayDetailDAT {

}

export interface FetchPhoneNumRes extends ResponseHasToken {
    RES: PhoneNumRES
}

export interface FetchOptionsRes extends ResponseRET<CSOptionsDAT> {}

export interface FetchClassListRes extends ResponseRET<FetchKXClassListDAT> {
    "ZL": FetchKXClassListDAT[]
}

export interface FetchRDClassListDAT{
    "rowid": number,
    "CLASS_ID": number,
    "COURSENO": string,
    "COURSENAME": string,
    "CLASSNAME": string,
    "MAXNUM": number,
    "MINNUM": number,
    "S_ZS_DATE": string,
    "E_ZS_DATE": string,
    "SH_FLAGNR": string,
    "PLACE": string | null,
    "STATE": string,
    "STATENR": string
}

export interface UserEnrollListDAT {
    "ENROLL_ID": number
    "CUSER_ID": number
    "STUDENTNO": string
    "STUDENTNAME": string
    "PICID": string
    "ZZTYPE_ID": string
    "SFZNO": string
    "SEX": number
    "SEXNR": string
    "ADDR": string
    "PHONENO": string
    "LXR": string
    "LXR_PHONENO": string
    "ZZMM": string
    "ZZMMNR": string
    "WHCD": string
    "WHCDNR": string
    "YDW": string
    "YZW": string
    "ZKCNSID": string
    "CLASS_IDS": string
    "CLASS_NAMES": string
    "STATE": string
    "STATENR": string
}

export interface UserEnrollZLListDAT {
    "ZL": string
    "CBM_ID": number
    "MAJOR_ID": number
    "MAJOR_NAME": string
    "CLASS_ID": number
    "CLASSNAME": string
    "Y_CLASS_ID": string | null,
    "Y_CLASSNAME": string | null,
    "S_KK_DATE": number
    "SKSJS": number
    "SKSJSNR": number
    "SFJE1": number
    "SFJE2": number
    "DSZ_FLAG": string
    "DSZ_FLAGNR": string
    "SH_FLAG": string
    "SH_FLAGNR": string
    "STATE": string
    "STATENR": string
    "ZZY_FLAG": string
    "QXXZ_FLAG": string
}

export interface FetchZZYClassListDAT {
    "rowid": number
    "MAJOR_ID": number
    "MAJOR_NAME": string
    "CLASS_ID": number
    "CLASSNAME": string
    "S_KK_DATE": string
    "SKSJS": string
    "SKSJSNR": string
    "SFJE1": number
    "SFJE2": number
    "DSZ_FLAG": string
    "DSZ_FLAGNR": string
    "SH_FLAG": string
    "SH_FLAGNR": string
}

export interface FetchZZYEnrollListDAT {
    CBM_ID: number
    ENROLL_ID: number
    CLASSNAME: string
    Y_CLASSNAME: string
    Z_CLASSNAME: string
    STUDENTNO: string
    STUDENTNAME: string
    STUDENT_FLAGNR: string
    SH_FLAGNR: string
    STATENR: string
}

export interface FetchZZYEnrollDetailDAT{
    CBM_ID: number
    ENROLL_ID: number
    STUDENTNO: string
    STUDENTNAME: string
    PICID: string
    SFZNO: string
    SEX: string | number
    SEXNR: string
    ADDR: string
    PHONENO: string
    LXR: string
    LXR_PHONENO: string
    ZZMM: string | number
    ZZMMNR: string
    WHCD: string | number
    WHCDNR: string
    YDW: string
    YZW: string
    ZKCNSID: string
    CLASS_ID: number
    CLASSNAME: string
    Y_CLASS_ID: number
    Y_CLASSNAME: string
    Z_CLASS_ID: number
    Z_CLASSNAME: string
    STATE: string
    STATENR: string
    SH_FLAG: string
    SH_FLAGNR: string
    STUDENT_FLAG: string
    STUDENT_FLAGNR: string
}

export interface FetchRDCourseListDAT{
    COURSE_ID: number
    COURSENO: string
    COURSENAME: string
    TEACHER_NAME: string
    CLASSLEADER: string
    STATE: string
    STATENR: string

}

export interface FetchRDCourseDetailDAT{
    "COURSE_ID": number
    "MAJOR_ID": number
    "MAJOR_NAME": string
    "COURSENO": string
    "COURSENAME": string
    "TEACHER_ID": number
    "TEACHER_NAME": string
    "CLASSLEADER_ID": number
    "CLASSLEADER": string
    "STATE": string
    "STATENR": string
}

export interface FetchCourseZSListDAT {
    "rowid": number
    "CLASS_ID": number
    "COURSENO": string
    "COURSENAME": string
    "CLASSNAME": string
    "MAXNUM": string
    "MINNUM": string
    "S_ZS_DATE": string
    "E_ZS_DATE": string
    "SH_FLAGNR": string
    "PLACE": string
    "STATE": string
    "STATENR": string
}

export interface FetchCourseZSDetailDAT {
    "CLASS_ID": number
    "MAJOR_ID": number
    "MAJOR_NAME": string
    "COURSE_ID": number
    "COURSENAME": string
    "CLASSNAME": string
    "MAXNUM": number
    "MINNUM": number
    "S_ZS_DATE": string
    "E_ZS_DATE": string
    "YBXD_DATE": string
    "LSZB_DATE": string
    "SH_FLAG": string
    "SH_FLAGNR": string
    "S_KK_DATE": string
    "E_KK_DATE": string
    "CLASS_HOUR": number
    "DSZ_FLAG": string
    "DSZ_FLAGNR": string
    "PLACE": string
    "SKSJ1": number
    "SKSJ1NR": number | string | null
    "SKSJ2": number
    "SKSJ2NR": null | string | number
    "SKSJ3": number
    "SKSJ3NR": null | string | number
    "SKSJ4": number
    "SKSJ4NR": null | string | number
    "SKSJ5": number
    "SKSJ5NR": number
    "SFJE1": number
    "SFJE2": number
    "STATE": string
    "STATENR": string
}

export interface FetchSKSJListDAT {
    "CLASSTIME_ID": number
    "CLASSTIME_NAME": string
}

export interface UserPermissionDAT{
    "QX_ID": number
    "QXNAME": string
}

export interface UserRoleListDAT {
    "ROLE_ID": number
    "ROLENAME": string
}

export interface FetchRDClassListRes extends ResponseRET<FetchRDClassListDAT> {}

export interface FetchZZYClassListRes extends ResponseRET<FetchZZYClassListDAT> {}

export interface FetchRDCourseListRes extends ResponseRET<FetchRDCourseListDAT> {}

export interface FetchRDCourseDetailRes extends ResponseRET<FetchRDCourseDetailDAT> {}

export interface ModifyRDCourseInfoRes extends ResponseRET {}

export interface FetchCourseZSListRes extends ResponseRET<FetchCourseZSListDAT> {}

export interface FetchCourseZSDetailRes extends ResponseRET<FetchCourseZSDetailDAT> {}

export interface FetchSKSJListRes extends ResponseRET<FetchSKSJListDAT> {}

export interface ModifyCourseZSInfoRes extends ResponseRET {}

export interface FetchMembersDataRes extends ResponseRET<FetchMembersDAT> {}

export interface FetchMemberDetailRes extends ResponseRET<MemberDetailTeacherDAT | MemberDetailStudentDAT> {}

export interface ModifyUserStatusRes extends ResponseRET {}

export interface ModifyUserRoleRes extends ResponseRET {}

export interface FetchEnrollListRes extends ResponseRET<EnrollListDAT> {}

export interface FetchMajorOptRes extends ResponseRET<MajorOptDAT> {}

export interface UserRoleListRes extends ResponseRET<UserRoleListDAT> {}

export interface FetchVerifyEnrollRes extends ResponseRET<VerifyEnrollDAT> {}

export interface DoVerifyEnrollRes extends ResponseRET<DoVerifyEnrollDAT> {}

export interface FetchPayListRes extends ResponseRET<PayListDAT> {}

export interface FetchVerifyEnrollDetailRes extends ResponseRET<VerifyEnrollDetailDAT> {}

export interface FetchUserEnrollListRes extends ResponseRET<UserEnrollListDAT> {
    ZL: UserEnrollZLListDAT[]
}

export interface ApplyZZYRes extends ResponseRET {}

export interface FetchZZYEnrollListRes extends ResponseRET<FetchZZYEnrollListDAT> {}

export interface FetchZZYEnrollDetailRes extends ResponseRET<FetchZZYEnrollDetailDAT> {}

export interface FetchPayDetailRes extends ResponseRET<PayDetailDAT> {}

export interface UserPermissionRes extends ResponseRET<UserPermissionDAT> {}

export interface FetchPayInfoRes {
    message: {
        nonceStr: string
        package: string
        paySign: string
        signType: string
        timeStamp: string
    }
    meta: {
        msg: string
        status: number
    }
}

export interface payout{
	
	amount: {
		currency: string,
		payer_currency: string,
		payer_total: number,
		total: number
	},
	appid: string,
	attach: string,
	bank_type: string,
	mchid: string,
	out_trade_no: string,
	payer: {
		openid: string
	},
	promotion_detail: any,
	success_time: string,
	trade_state: string,
	trade_state_desc: string,
	trade_type: string,
	transaction_id: string
	
}